#ifndef _FENGINE_PAGED_OBJECT_
#define _FENGINE_PAGED_OBJECT_

#include "FEngineType.h"
#include "Entity.h"


namespace FEngine
{
	/**
	 * Represent the basic 3D object loaded in a ForestLoader.
	 */
	class PagedEntity : public Entity
	{

		public:
			
			/**
			 * Constructor.
			 * @param _fileName Name of the .x file of the mesh.
			 * @param _textureName Name of the texture file of the mesh.
			 * @param _generateImpostor True if we need to generate the impostor texture file.
			 */
			PagedEntity(const std::string& _fileName, const std::string& _textureName, bool _generateImpostor);
			virtual ~PagedEntity();


			void getVertexBuffer(LPDIRECT3DVERTEXBUFFER9* _vb) const;
			void getIndexBuffer(LPDIRECT3DINDEXBUFFER9* _ib) const;
			void getTexture(LPDIRECT3DTEXTURE9* _texture) const;
			int getNumberVertices() const;
			int getNumberPrimitives() const;
			
			void getImpostorTexture(LPDIRECT3DTEXTURE9* _texture) const;
			Vector3 getImpostorScale() const;

			LPDIRECT3DTEXTURE9	mImpostorTexture;
			Vector3				mImpostorScale;
	};

} // namespace FEngine

#endif
